package com.ypf.demo_ssm.controller;

import com.ypf.demo_ssm.service.impl.OrderServiceImpl;
import com.ypf.demo_ssm.dto.response.OrderUserVO;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import jakarta.annotation.Resource;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author 殷鹏飞
 * @since 2024-06-23
 */
@RestController
@RequestMapping("/order")
@Tag(name = "订单")
public class OrderController {

    @Resource
    private OrderServiceImpl orderService;

    @Operation(summary = "模糊查询订单列表")
    @GetMapping("/queryList")
    public List<OrderUserVO> queryList(@RequestParam(value = "name", required = false) String name) {
        return orderService.queryList(name);
    }



}
